package com.esri.core.geometry;

import com.esri.core.geometry.Geometry;
import java.io.Serializable;

/* loaded from: classes.dex */
public class SegmentBuffer implements Serializable {
    private static final long serialVersionUID = 1;
    Line a = null;
    Segment b = null;

    public Segment get() {
        return this.b;
    }

    public void set(Segment segment) {
        this.b = segment;
        if (segment != null) {
            if (segment.getType() == Geometry.Type.LINE) {
                this.a = (Line) segment;
            }
            throw new GeometryException("internal error");
        }
    }

    public void createLine() {
        if (this.a == null) {
            this.a = new Line();
        }
        this.b = this.a;
    }
}
